package db.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the stationstatus database table.
 * 
 */
@Embeddable
public class StationStatusPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

    @Temporal( TemporalType.TIMESTAMP)
	private java.util.Date dataDate;

	private String name;

    public StationStatusPK() {
    }
	public java.util.Date getDataDate() {
		return this.dataDate;
	}
	public void setDataDate(java.util.Date dataDate) {
		this.dataDate = dataDate;
	}
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof StationStatusPK)) {
			return false;
		}
		StationStatusPK castOther = (StationStatusPK)other;
		return 
			this.dataDate.equals(castOther.dataDate)
			&& this.name.equals(castOther.name);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.dataDate.hashCode();
		hash = hash * prime + this.name.hashCode();
		
		return hash;
    }
}